package 谜一样的牛;

import java.util.*;

public class Main {
    static int N = 100010, n;
    static int[] ans = new int[N];
    static int[] tr = new int[N];
    static int[] h = new int[N];

    public static void main(String[] args) {
        Scanner in = new Scanner(System.in);
        n = in.nextInt();
        for (int i = 2; i <= n; i++) {
            h[i] = in.nextInt();
        }
        for (int i = 1; i <= n; i++) {
            add(i, 1);
        }
        for (int i = n; i >= 1; i--) {
            int k = h[i] + 1;
            int l = 1, r = n;
            while (l < r) {
                int mid = l + r >> 1;
                if (sum(mid) >= k) {
                    r = mid;
                } else {
                    l = mid + 1;
                }
            }
            ans[i] = l;
            add(l, -1);
        }
        for (int i = 1; i <= n; i++) {
            System.out.println(ans[i]);
        }
    }

    private static int sum(int x) {
        int ret = 0;
        for (int i = x; i >= 1; i -= lowbit(i)) {
            ret += tr[i];
        }
        return ret;
    }

    private static void add(int x, int c) {
        for (int i = x; i <= n; i += lowbit(i)) {
            tr[i] += c;
        }
    }

    private static int lowbit(int x) {
        return x & -x;
    }
}
